﻿using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;

namespace YiSha.SqlSugars
{
    /// <summary>
    /// 
    /// </summary>
    public class ConvertDbType
    {
        /// <summary>
        /// 获取类型
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="model"></param>
        /// <returns></returns>
        public static SqlSugar.DbType GetDbType(string dbType)
        {
            switch (dbType)
            {
                case "SqlServer":
                    return SqlSugar.DbType.SqlServer;
                case "MySql":
                    return SqlSugar.DbType.MySql;
                case "Oracle":
                    return SqlSugar.DbType.Oracle;
                default:
                    throw new Exception("未找到数据库配置");
            }
        }
    }
}
